Data types used in CelestLab
In CelestLab most functions are vectorized. Arguments of functions are generally vectors of size:
The quaternion q associated with the rotation of axis u and angle alpha and defined relative to frame R is given by:
with (ux,uy,uz): coordinates of axis u in frame R.
Note that a quaternion in CelestLab is not an array, but a mlist. When a quaternion is printed on the screen, the components appear in the order: q0, q1, q2, q3.
CelestLab contains operators for the management of quaternions:
size: size(q)
norm: norm(q)
inverse: inv(q)
conjugate: conj(q) = ~q = q'
extraction of real and imaginary part: real(q) = q.r, imag(q) = q.i
concatenation: [q1,q2,...,qn]
extraction: q2 = q1([i,j,k,...])
insertion: q2([i,j,k,...]) = q1
suppression: q2([i,j,k,...]) = []
Scilab's hypermatrix type (mlist 'hm') is partly overloaded in CelestLab. Hypermatrices should be of dimension 3.
A hypermatrix is considered as a set of matrices: A = [A1, A2,..., An], where Ak = A(:,:,k).
A matrix (when multiplied by a hypermatrix) is considered as a set of column vectors: B = [B1, B2,..., Bn], where Bk = B(:,k).
The overloaded operations are: